import xlrd
from selenium import webdriver
import time
from xlwt import *
from selenium.common.exceptions import NoSuchElementException

browser=webdriver.Chrome()
browser.get('http://test.touzitop.com/index.php?id=4776')

file=xlrd.open_workbook('./tel.xls')
# print(file.sheet_names())
table=file.sheets()[0]
nrows=table.nrows

for i in range(nrows):
    tel = int(table.row_values(i)[0])
    browser.find_element_by_xpath('//*[@id="mphone"]').send_keys(tel)
    browser.find_element_by_xpath('//*[@id="getAskInfo"]').click()
    time.sleep(2)

browser.quit()

